Output image data generating device and method of generating output image data

ABSTRACT

A CPU selects multiple objective image data to be pasted on ornamental image data, analyzes the selected multiple objective image data, and rates the image qualities of the respective image data. The CPU specifies the number of plural layout locations included in the ornamental image data and the priority order of the plural layout locations, and allocates the multiple objective image data to the plural layout locations in the ornamental image data, based on the specified priority order and the ratings of the multiple objective image data. The CPU executes image quality adjustment with regard to the multiple objective image data allocated to the plural layout locations and pastes the quality-adjusted image data on the ornamental image data according to layout control information, so as to generate resulting output image data.

CROSS REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. application Ser. No.10/939,161, filed on Sep. 9, 2004. The disclosure of this priorapplication from which priority is claimed is incorporated herein byreference for all purposes.

BACKGROUND OF THE INVENTION

1. Field of Technology

The present invention relates to a technique of generating output imagedata, based on ornamental image data that gives some ornamental effectto objective image data and layout control information that specifieslayout locations and layout dimensions of respective objective imagedata to be laid out on the ornamental image data.

2. Description of the Related Art

There are some practical techniques of pasting objective image data, forexample, image data taken by an imaging device, on ornamental imagedata, for example, frame image data, to output a resulting output imageincluding objective images surrounded by an ornamental image on amedium, such as paper. This technique uses layout control informationincluding a script that describes layout locations and layout dimensionsof the objective image data laid out on the ornamental image data.

The layout control information is related to the ornamental image data.In response to the user's selection and layout of objective image dataon ornamental image data, this technique pastes the objective image dataresized to preset dimensions at preset locations in the ornamental imagedata and thereby generates a resulting output image including theobjective images surrounded by the ornamental image.

This prior art technique requires the user to select and lay out all theobjective image data on the ornamental image data. The selection andlayout of a large number of objective image data takes a relatively longtime. It is not easy for the standard user to determine the effectivelayout of objective image data on ornamental image data. A technique ofeasily and impressively laying out objective image data on ornamentalimage data is thus highly demanded.

SUMMARY OF THE INVENTION

The object of the invention is thus to readily and impressively lay outmultiple objective image data in layout locations on ornamental imagedata.

In order to attain at least part of the above and the other relatedobjects, the present invention is directed to an output image datagenerating device that generates output image data from multipleobjective image data and ornamental image data according to layoutcontrol information, which specifies layout locations and layoutdimensions of the multiple objective image data to be laid out on theornamental image data. The output image data generating device includes:an image data acquisition module that obtains the multiple objectiveimage data; a ornamental image data acquisition module that obtains oneor plurality of the ornamental image data; an image analysis module thatanalyzes each of the obtained multiple objective image data; a layoutlocation assignment module that allocates the multiple objective imagedata to plural layout locations included in the obtained ornamentalimage data, based on a result of the analysis; and an output image datageneration module that generates output image data from the multipleobjective image data and the ornamental image data, according to thelayout control information and the allocation of the respectiveobjective image data to the plural layout locations.

The output image data generating device of the invention analyzes eachof the obtained multiple objective image data, allocates the multipleobjective image data to the plural layout locations in the ornamentalimage data based on the result of the analysis, and generates resultingoutput image data from the multiple objective image data and theornamental image data according to the layout control information andthe allocation of the objective image data to the layout locations. Thisarrangement ensures easy and impressive layout of multiple objectiveimage data in respective layout locations on ornamental image data,according to a result of analysis of the multiple objective image data.

In one preferable aspect of the output image data generating device ofthe invention, the image analysis module rates image qualities of theobtained multiple objective image data, and the layout locationassignment module sequentially allocates the multiple objective imagedata to the plural layout locations included in the ornamental imagedata in a descending order of the ratings.

The output image data generating device of this aspect rates the imagequalities of the respective objective image data, sequentially allocatesthe objective image data to the layout locations in the ornamental imagedata in the descending order of the ratings, and generates resultingoutput image data from the multiple objective image data and theornamental image data according to the layout control information andthe allocation of the objective image data to the layout locations. Thisarrangement ensures easy and impressive layout of multiple objectiveimage data in respective layout locations on ornamental image data.

In another preferable aspect of the invention, the output image datagenerating device further includes: a correction value setting modulethat analyzes each of the multiple objective image data allocated to oneof the plural layout locations and sets a correction value with regardto the objective image data; and an image quality adjustment module thatexecutes image quality adjustment of each objective image data with thesetting of the correction value. The output image data generation modulegenerates the output image data from the multiple objective image datathat has gone through the image quality adjustment. The output imagedata generating device of this aspect executes image quality adjustmentof each objective image data with the correction value set according tothe result of analysis of the objective image data, thus generatingoutput image data including higher-quality objective image data.

In the output image data generating device of this aspect, thecorrection value setting module may analyze each of the multipleobjective image data to obtain a characteristic value of the objectiveimage data with regard to an image quality-relating parameter and setthe correction value of the objective image data, in order to cancel outor at least reduce a difference between the characteristic value and apreset reference value with regard to the image quality-relatingparameter. This arrangement sets the correction value, based on thecharacteristic value corresponding to the result of analysis of eachobjective image data and the preset reference value of the imagequality-relating parameter and thus preferably implements auto imagequality adjustment.

In another preferable aspect of the output image data generating deviceof the invention, the layout location assignment module sequentiallyallocates the multiple objective image data to the plural layoutlocations in the ornamental image data until all the plural layoutlocations of the ornamental image data are occupied. Allocation ofobjective image data to one layout location is repeatedly carried outuntil all the layout locations included in the ornamental image data areoccupied.

In still another preferable aspect of the output image data generatingdevice of the invention, the layout control information additionallyspecifies a priority order of the plural layout locations, and thelayout location assignment module sequentially allocates objective imagedata having a better result of analysis to a layout location having ahigher priority in the ornamental image data.

The output image data generating device of this aspect sequentiallyallocates the objective image data of the higher rating to the layoutlocation of the higher priority in the ornamental image data, andgenerates resulting output image data from the multiple objective imagedata and the ornamental image data according to the layout controlinformation and the allocation of the objective image data to the layoutlocations. This arrangement ensures easy layout of multiple objectiveimage data in respective layout locations on ornamental image data. Thisarrangement allocates the higher-quality objective image data to theimportant layout locations or the main layout locations in theornamental image data, thus generating impressive output image data.

In another preferable aspect of the output image data generating deviceof the invention, the image analysis module computes statistical valuesof each of the multiple objective image data with regard to contrast,brightness, color balance, chroma/saturation, and sharpness, evaluatesthe image quality of the objective image data based on the computedstatistical values and preset reference values with regard to thecontrast, the brightness, the color balance, the chroma/saturation, andthe sharpness, and gives a better result of analysis to a smallerdifference between the statistical value and the preset reference value.

In the output image data generating device of the invention, a higherpriority may be given to a layout location having greater layoutdimensions or given to a layout location that is placed closer to acenter of the ornamental image data. This arrangement allocates the moreprominent objective image data to the layout locations of the higherpriorities on the ornamental image data and thereby generates impressiveoutput image data. The larger size of the objective image data, which isgreatly affected by the image quality adjustment, is pasted in thelayout location having the greater layout dimensions. The central areaof the ornamental image data is noticeable and is accordingly requiredto have good impression by the image quality adjustment.

In another preferable aspect of the invention, the output image datagenerating device further includes a modification module that changes atleast either selection of the objective image data to be laid out in thelayout locations in the ornamental image data or the allocation of themultiple objective image data to the plural layout locations executed bythe layout location assignment module. This arrangement enables theselection of the objective image data and the allocation of therespective objective image data to the layout locations in theornamental image data to be changed according to the user's demands.

The present invention is also directed to an output image datagenerating method that generates output image data from multipleobjective image data and ornamental image data according to layoutcontrol information, which specifies layout locations and layoutdimensions of the multiple objective image data to be laid out on theornamental image data. The output image data generating method obtainsthe multiple objective image data; obtains one or plurality of theornamental image data; analyzes each of the obtained multiple objectiveimage data; allocates the multiple objective image data to plural layoutlocations included in the obtained ornamental image data, based on aresult of the analysis; and generates output image data from themultiple objective image data and the ornamental image data, accordingto the layout control information and the allocation of the respectiveobjective image data to the plural layout locations.

The output image data generating method of the invention has the samefunctions and effects as those of the output image data generatingdevice of the invention described above. The diversity of arrangementsadopted to the output image data generating device are also applicableto the output image data generating method.

The output image data generating method of the invention is alsoactualized by a corresponding output image data generating program and acomputer readable recording medium in which the output image datagenerating program is recorded.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically illustrates the configuration of an imageprocessing system including an output image data generating device in afirst embodiment;

FIG. 2 is a functional block diagram showing the functions of a personalcomputer 20 (CPU 200) in the first embodiment;

FIG. 3 is a flowchart showing a routine of output image data generationprocess executed by the personal computer 20 in the first embodiment;

FIG. 4 shows layout locations and layout dimensions of image data laidout on ornamental image data;

FIG. 5 shows the file structure of a ornamental image file FF includingornamental image data FD and layout control information LI;

FIG. 6 shows the file structure of an image file GF including image dataGD and image processing control information GI;

FIG. 7 shows results of evaluation of image data GD1 to GD3 in the firstembodiment;

FIG. 8 shows an example of allocation of image data GD to layoutlocations based on a priority order defined in the layout controlinformation LI and the ratings given by evaluation of the image data GD;

FIG. 9 shows an example of ratings of image data GD1 to GD5 in thesecond embodiment; and

FIG. 10 shows an example of allocation of image data GD to layoutlocations based on a priority order defined in the layout controlinformation LI and the ratings given by evaluation of the image data GDin the second embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment

The output image data generating device and the corresponding outputimage data generating method of the invention are described according toone embodiment with the attached drawings.

An image processing system including an output image data generatingdevice of the embodiment is described with reference to FIG. 1. FIG. 1schematically illustrates the configuration of the image processingsystem including the output image data generating device of theembodiment.

The image processing system includes a digital still camera 10functioning as an input device to generate image data, a personalcomputer 20 functioning as the output image data generating device toexecute a series of image processing with regard to input image datagenerated by the digital still camera 10 and output the processed imagedata as output image data, and a color printer 30 functioning as anoutput device to output a processed image corresponding to the outputimage data. The color printer 30 may have the output data generatingfunctions of the personal computer 20. In this case, the stand-alonecolor printer 30 carries out both the image processing and the imageoutput. The output device is not restricted to the color printer 30 butmay be a monitor 25, such as a CRT display or an LCD display, or aprojector. In the description below, the color printer 30 connected withthe personal computer 20 is used as the output device.

The personal computer 20 is a general computer and includes a centralprocessing unit (CPU) 200 that executes a objective image dataevaluation process and an output image data generation process withlayout control information LI, a random access memory (RAM) 201 thattemporarily stores various data including input image data, and a harddisk drive (HDD) 202 (or a read only memory (ROM)) that stores programsand reference tables for execution of the objective image dataevaluation process and the output image data generation process with thelayout control information LI. The personal computer 20 additionally hasa memory card slot 203 to receive a memory card MC inserted therein andinput and output terminals 204 connected with connection cables from,for example, the digital still camera 10.

The digital still camera 10 focuses light information on a digitaldevice (a photoelectric conversion element, such as a CCD or aphotoelectron multiplier) to take an image. The digital still camera 10includes a photoelectric conversion circuit with a CCD to convert lightinformation into analog electric signals, an image acquisition circuitto control the photoelectric conversion circuit and obtain a digitalimage, and an image processing circuit to process the obtained digitalimage. The digital still camera 10 stores the obtained digital imagedata into the memory card MC as a storage device. The JPEG format forlossy compression storage and the TIFF format for lossless compressionstorage are typically used to store image data taken by the digitalstill camera 10, although other storage formats, such as RAW format, GIFformat, and BMP format may be adoptable.

The digital still camera 10 writes imaging information, which is set ateach time of imaging and describes imaging conditions, and imageprocessing control information GI, which is stored in advance in amemory (for example, a ROM) of the digital still camera 10, into aheader of image data (objective image data) in the process of generationof image data and stores the generated image data into the memory cardMC. The digital still camera 10 also stores ornamental image data FD,which gives some ornamental effect to objective image data GD, andlayout control information LI, which specifies layout locations, layoutdimensions, and a priority order of the respective objective image dataGD to be laid out on the ornamental image data FD and is related to theornamental image data FD, in its memory and writes the ornamental imagedata FD and the layout control information LI together with thegenerated image data into the memory card MC. The digital still camera10 may have the output image data generation functions of the personalcomputer 20. Direct connection of the digital still camera 10 having theoutput image data generation functions to the printer 30 enables animage corresponding to image data obtained by imaging to be outputwithout the personal computer 20.

The ornamental image data FD is, for example, frame image data or albummounting image data on which multiple objective image data are pasted,and may be generated in the form of bitmap data or vector data. Thelayout control information LI has a script specifying the layoutlocations, the layout dimensions, and the priority order of therespective objective image data GD to be laid out on the ornamentalimage data FD in this embodiment. In the description below, theobjective image data specified as layout objects are image data taken byan imaging device. The objective image data of layout objects are,however, not restricted to the image data taken by the imaging devicebut may be any image data mountable on the ornamental image data FD, forexample, image data generated by computer graphics. The image processingcontrol information GI includes pieces of information (commands)specifying experimentally obtained image quality adjustment conditionsto enable a selected output device to give a desired output result of animage corresponding to image data generated by any selected image datageneration device, such as the digital still camera 10. The imageprocessing control information GI includes the settings of respectiveparameters for specifying the image quality adjustment conditionsaccording to the combination of the digital still camera 10 and theselected output device (for example, the printer 30).

The image data generated by the digital still camera 10 is sent to thecolor printer 30 via a cable CV and the computer 20 or via only a cableCV. The image data taken by the digital still camera 10 may otherwise bestored in the memory card MC and given to the color printer 30 from thememory card MC, which is inserted into the memory card slot of thepersonal computer 20 or is directly connected to the color printer 30.In the description below, the personal computer 20 executes the outputimage data generation process with image data and ornamental image dataand sends resulting output image data to the color printer 30.

The color printer 30 is capable of outputting color images and is, forexample, an inkjet printer that ejects four color inks, cyan (C),magenta (M), yellow (Y), and black (K), onto a printing medium to createa dot pattern and thereby form an image. The color printer 30 may be anelectrophotographic printer that transfers and fixes color toners on aprinting medium to form an image. Other color inks, light cyan (LC),light magenta (LM), and dark yellow (DY), may be used in addition to theabove four color inks.

Image Processing by Personal Computer 20

The functional configuration of the personal computer 20 (CPU 200) isdescribed with reference to FIG. 2. FIG. 2 is a functional block diagramshowing the functions of the personal computer 20 (CPU 200) in thisembodiment.

The personal computer 20 (CPU 200) has an image data acquisition modulethat selects multiple image data GD to be pasted on ornamental imagedata FD, from at least one of a folder 1 storing multiple image data GD1to GD5 and a folder 2 storing multiple image data GD1 to GD4. An imagedata evaluation module analyzes each of the selected image data andevaluates the image quality of each image data based on the result ofthe analysis.

An ornamental image data acquisition module obtains one or multipleornamental image data FD among stored ornamental image data FD1 to FD3.A layout control information acquisition module analyzes layout controlinformation related to the obtained ornamental image data FD, extractsthe number of layout locations and the priority order of the layoutlocations with regard to the obtained ornamental image data FD, andsends the extracted information to a layout location assignment module.

The layout location assignment module assigns the multiple image data GDto the layout locations of the ornamental image data FD, based on thepriority order obtained by the layout control information acquisitionmodule and the results of evaluation made by the image data evaluationmodule. The image data GD having the higher ratings are successivelyallocated to the layout locations having the higher priorities. When thenumber of the image data is greater than the number of the layoutlocations, allocation of the image data GD to the layout locationscontinues as long as there is any vacant layout location, and isterminated when all the layout locations are occupied. The remainingimage data GD that have not been assigned to any layout locations arethus not mounted on the ornamental image data FD. When the number of theimage data is less than the number of the layout locations, on the otherhand, only the layout locations having the higher priorities in theornamental image data FD are filled with the image data GD.

An image quality adjustment module executes an image quality adjustmentprocess with regard to the image data FD assigned to the layoutlocations and sends the processed image data GD to an output image datageneration module. The image quality adjustment process executed by theimage quality adjustment module may automatically adjust the imagequality, based on characteristic values obtained by analysis of theimage data GD and reference values.

The output image data generation module pastes the processed image dataGD received from the image quality adjustment module onto the ornamentalimage data FD obtained according to the layout control information bythe layout control information acquisition module and generatesresulting output image data. A user image quality modification modulechanges allocation of the image data to the layout locations by thelayout location assignment module, in response to the user'sinstructions given via an input unit.

The output image data generation process executed by the personalcomputer 20 in the first embodiment is described with reference to FIGS.3 through 8. FIG. 3 is a flowchart showing a routine of the output imagedata generation process executed by the personal computer 20 in thefirst embodiment. FIG. 4 shows an example of layout locations and layoutdimensions of image data laid out on ornamental image data. FIG. 5 showsthe file structure of an ornamental image file FF including ornamentalimage data FD and layout control information LI. FIG. 6 shows the filestructure of an image file GF including image data GD and imageprocessing control information GI. FIG. 7 shows results of evaluation ofimage data GD1 to GD3 in the first embodiment. FIG. 8 shows an exampleof allocation of image data GD to layout locations based on the priorityorder defined in the layout control information LI and the ratings givenby evaluation of the image data GD. The layout locations of the imagedata GD on the ornamental image data FD conceptually show the state ofexpansion on an image buffer. The file structure of each fileconceptually shows the state of storage in a memory.

The output image data generation process of this embodiment may beactivated in response to insertion of the memory card MC into thepersonal computer 20 or in response to connection of the digital stillcamera 10 to the personal computer 20 via the communication cable. Theoutput image data generation process may otherwise be executed inresponse to the user's operation of a keyboard to give a start command.

When the output image data generation process starts, the personalcomputer 20 (CPU 200) first reads selected ornamental image data FD forlayout of image data GD and temporarily stores the selected ornamentalimage data FD in the RAM 201 (step S100). The ornamental image data FDmay be selected by the user or may be related in advance to image dataGD in the digital still camera 10. The user may select desiredornamental image data FD on the digital still camera 10 or may operatethe keyboard to select desired ornamental image data FD among a largenumber of ornamental image data stored in the HDD 202 on the personalcomputer 20. The user may alternatively select desired ornamental, imagedata FD via the network.

The ornamental image data FD gives some ornamental effect to an imageand is, for example, a photo frame image data, a photo album (albummounting) image data, or illustration data. The ornamental image data FDhas a form shown in FIG. 4 in a resulting output image (in expansion onan image buffer) and includes three layout locations A to C, on whichimage data are pasted. The ornamental image data FD is transmittedtogether with the layout control information LI in the form of anornamental image file FF. The ornamental image file FF has, for example,the file structure of FIG. 5. The layout control information LI includeslayout location information (for example, coordinate information) on therespective layout locations A to C for layout of image data GD andinformation regarding the layout dimensions (resized dimensions) and thepriority order of the respective layout locations A to C. The priorityorder is determined according to the layout locations and the dimensionsof the respective layout location areas of the ornamental image data FD.For example, the higher priority is given to the layout location closerto the center of the ornamental image data FD and to the layout locationhaving the greater layout location area.

The layout control information L1 further includes a channel data, whichis used to regulate tone values (R, G, and B tone data) of upper imagedata (for example, ornamental image data FD) located on an upper side ina resulting composite image relative to those of lower image data (forexample, image data GD) located on a lower side and thereby determinethe transparency of the lower image data against the upper image data.For example, the α channel data applies a coefficient α to the R, G, andB tone data of the upper image data, while applying a coefficient (1-α)to the R, G, and B tone data of the lower image data. The α channel dataset equal to 255 shows no appearance of the lower image data (opaque) ina resulting composite image, whereas the α channel data set equal to 0shows perfect appearance of the lower image data (transparent) in aresulting composite image. Semi-transparent ornamental effects are givenby setting the α channel data in a range of 0 to 255.

The CPU 200 subsequently reads multiple image data GD from a selectedimage folder and temporarily stores the multiple image data GD in theRAM 201 (step S110). The user may select a desired image folder or theCPU 200 may arbitrarily (successively) select one image folder from adirectory that stores image folders as optional processing objects.

Each image data GD may be related to image processing controlinformation GI to form one image file GF as shown in FIG. 6. The imageprocessing control information GI may be described in a header of theimage data GD or may be related to the image data GD by thirdcorrelation data. When the image processing control information GIspecifies a reduction rate of the difference between a characteristicvalue and a reference value of each image quality adjustment parameter,that is, a level of auto image quality adjustment, a correction value inthe image quality adjustment process is varied according to thereduction rate specified in the image processing control information GI.When the image processing control information GI specifies calculatedvalues of respective image quality adjustment parameters, on the otherhand, each calculated value represents a correction value in the imagequality adjustment process. The image processing control information GIenables image quality adjustment with correction values reflecting thephotographer's requirements.

The CPU 200 analyzes the obtained image data GD to calculate totalevaluation values of the respective image data GD (step S120), and ratesthe respective image data GD based on the calculated total evaluationvalues (step S130).

The evaluation method of this embodiment evaluates the image qualitiesof the respective image data GD with regard to the contrast, thebrightness, the color balance, the chroma/saturation, and the sharpnessamong various image quality-relating parameters (image qualityadjustment parameters) and computes evaluation values of the respectiveimage data GD. The image data GD used in this embodiment are, forexample, RGB data or YCbCr data consisting of a large number of pixeldata.

The CPU 200 scans each target image data GD in units of pixels to createa luminance distribution (histogram) of the target image data GD. Whenthe image data GD is RGB data, a luminance y of each pixel data iscalculated by an equation of:

y=0.30R+0.59G+0.11B

When the image data GD is YCbCr data, on the other hand, the luminance yis obtained directly from each pixel data.

The CPU 200 determines a maximum luminance Ymax and a minimum luminanceYmin of each target image data GD, based on the created luminancedistribution thereof. The luminance values at specific pixels, which are0.5% of the total number of pixels deviated inward from both ends of theluminance distribution (that is, a pixel having an actual maximumluminance value and a pixel having an actual minimum luminance value),are set to the maximum luminance Ymax and the minimum luminance Ymin.

Evaluation of Contrast

An evaluation value Econt of each target image data GD with regard tothe contrast parameter is calculated from the determined maximumluminance Ymax and minimum luminance Ymin according to equations givenbelow:

Econt=100+Ydif/255

Ydif=Ymax−Ymin

The greater luminance contrast of the target image data GD (the greaterdifference between the maximum luminance Ymax and the minimum luminanceYmin) gives the higher evaluation value.

Evaluation of Brightness

Evaluation of the brightness is based on a median Ymed in the createdluminance distribution. An evaluation value Ebrgt of each target imagedata GD with regard to the brightness parameter is calculated from themedian Ymed of the luminance distribution and a preset reference mediumvalue Ymed_ref according to an equation given below:

Ebrgt=100−|Ymed−Ymed _(—) ref|

The calculated evaluation value Ebrgt of less than 0 is fixed toEbrgt=0. The reference medium value Ymed_ref is, for example, 106,although this value is not restrictive.

Evaluation of Color Balance

The CPU 200 creates histograms (frequency distributions) of therespective color components R, G, and B. According to a concreteprocedure, the CPU 200 divides the range of 256 tones into 8 to 16 equalparts (n equal parts) and sums up the frequencies of the respectivedivisional parts of the tone range. The CPU 200 sets the numbers ofpixels (r1, r2, . . . , rn), (g1, g2, . . . gn), and (b1, b2, . . . bn)included in the respective divisional parts of the tone range withregard to the respective color components R, G, and B to characteristicvectors VR, VG, and VB:

VR=(r1, r2 . . . rn)Σri=1

VG=(g1, g2 . . . gn)Σgi=1

VB=(b1, b2 . . . bn)Σbi=1

The CPU 200 then calculates degrees of similarity between thesecharacteristic vectors according to equations given below:

Col _(—) rg=(VR·VG)/|VR|·|VG|

Col _(—) gb=(VG·VB)/|VG|·|VB|

Col _(—) rg=(VB·VR)/|VB|·|VR|

The degree of similarity takes a value in a range of 0 to 1, where thevalue closer to 1 represents the higher degree of similarity. Anevaluation value Ecol of each target image data GD with regard to thecolor balance parameter is accordingly calculated from a minimum degreeof similarity COL_min (a combination of most different color balances)according to an equation given below:

Ecol=100×Col_min

Evaluation of Chroma/Saturation

The chroma/saturation is typically expressed by a deviation (distance)from a reference axis in a uv plane of an Luv color space. The procedureof this embodiment uses a quasi-chroma/saturation X defined below, inorder to save the trouble of conversion of the RGB data or the YCbCrdata into the Luv color space:

X=|G+R−2R|

The CPU 200 creates a histogram (a frequency distribution) of thequasi-chroma/saturation X. The CPU 200 determines a chroma/saturationindex S of each target image data GD according to the created histogram.According to a concrete procedure, a chroma/saturation at a specificpixel, which is 16% of the total number of pixels deviated inward from amaximum end in the histogram of the quasi-chroma/saturation X (that is,a pixel having an actual maximum chroma/saturation), is set to thechroma/saturation index S.

An evaluation value Esatu of each target image data GD with regard tothe chroma/saturation parameter is calculated from the chroma/saturationindex S according to an equation given below:

Esatu=25×(S ^(1/2))/4

The evaluation value Esatu is fixed to 100 when the chroma/saturationindex S is greater than 256.

Evaluation of Sharpness

A large luminance difference between adjoining pixel data included inimage data GD generally suggests the presence of an edge between theadjoining pixel data. In application of an XY Cartesian coordinatesystem to the image data GD, an edge differential Ddiff represents anindex of luminance difference between adjoining pixel data and isobtained by:

Ddiff=|g(x,y)|=(fx ² +fy ²)^(1/2)

Here fx and fy respectively denote a luminance difference in the Xdirection and a luminance difference in the Y direction:

fx=f(x+1,y)−f(x,y)

fy=f(x,y+1)−f(x,y)

The luminance may be expressed by the luminance value Y(x,y) or by theluminance values R(x,y), G(x,y), and B(x,y) with regard to therespective color components R, G, and B.

An average of the edge differentials Ddiff on the contour of each imagedata GD is used for evaluation of the sharpness of the target image dataGD. An average of the edge differentials Ddiff on the whole target imagedata GD (all the pixels included in the target image data GD)undesirably takes into account the edge differentials Ddiff of thepixels that do not form the contour of the target image data GD. Thisleads to misevaluation of sharpness.

One typical method of extracting the edge differentials Ddiff on thecontour sets an empirically determined edge differential of the contourto a threshold value Ddiff_ref and selects only the edge differentialsDdiff greater than the preset threshold value Ddiff_ref. The CPU 200accumulates the edge differentials Ddiff greater than the presetthreshold value Ddiff_ref and the number of pixels having the greateredge differentials Ddiff and divides the accumulated edge differentialDdiff by the total number of pixels to calculate an average edgedifferential Ddiff_ave of the contour.

An evaluation value Esha of each target image data GD with regard to thesharpness parameter is calculated from the average edge differentialDdiff_ave according to an equation given below:

Esha=4×Ddiff _(—) ave

The calculated evaluation value Esha of greater than 100 is fixed toEsha=100.

FIG. 7 shows an example of the calculated evaluation values of therespective image data GD1 to GD3 with regard to the respective imagequality adjustment parameters. The higher rating is given to the imagedata GD having the greater total evaluation value, which is the sum ofthe evaluation values of the respective image quality adjustmentparameters. In the example of FIG. 7, the first rating, the secondrating, and the third rating are respectively given to the image dataGD2, the image data GD3, and the image data GD1. The rating may bedetermined by the evaluation values of selected one or multiple imagequality adjustment parameters or by weighting the evaluation values ofselected one or multiple image quality adjustment parameters and summingup the evaluation values including the weighted evaluation values.

Referring back to the flowchart of FIG. 3, the CPU 200 obtains layoutcontrol information LI (step S140) and determines the priority order ofthe respective layout locations included in the ornamental image data FD(step S150). In the case of only one ornamental image data FD, thepriority order specified in the layout control information LI isdirectly set to the priority order. In the case of multiple ornamentalimage data FD, on the other hand, the procedure ranks the identicalpriority levels of the multiple ornamental image data FD according tothe layout locations and the layout dimensions and determines thepriority order of all the multiple ornamental image data FD.

The CPU 200 allocates the respective image data GD to the layoutlocations in the ornamental image data FD, based on the ratings and thepriority order as shown in FIG. 8 (step S160). In this embodiment, thenumber of the image data GD is identical with the number of the layoutlocations in the ornamental image data FD. The image data GD having thehigher rating (the higher total evaluation value) is assigned to thelayout location having the higher priority. In the example of FIG. 8,the image data GD2 having the first rating is allocated to the layoutlocation B having the highest priority, the image data GD3 having thesecond rating is allocated to the layout location A having the secondpriority, and the image data GD1 having the third rating is allocated tothe layout location C having the third priority. The user may manipulatea non-illustrated input unit to change the allocation of the respectiveimage data GD to the layout locations in the ornamental image data FD.The user may change the selection of the image data, as well as theallocation of the selected image data to the layout locations. Thisensures selection and layout of image data according to the user'sdemands.

The CPU 200 subsequently executes image quality adjustment of therespective image data GD allocated to the layout locations (step S170).According to a concrete procedure, the CPU 200 determines a correctionvalue of each image quality adjustment parameter to cancel out or atleast reduce a difference between a statistical value (characteristicvalue) corresponding to the evaluation value of each image data GD and apreset reference value with regard to the image quality adjustmentparameter. The CPU 200 adjusts the image quality of the image data GDwith the determined correction value. The personal computer 20 stores inadvance preset reference values of the respective image qualityadjustment parameters in the HDD 202. The image processing controlinformation GI may be reflected on determination of the correctionvalue, when the image data GD is related to the image processing controlinformation GI.

The image quality adjustment uses tone curves (S curves) that correlateinput levels to output levels of the respective color components R, G,and B of the image data GD with regard to image quality adjustmentparameters, the shadowing, the highlighting, the brightness, thecontrast, the color balance, and the memory color correction. In theimage quality adjustment with the tone curves, a correction value ofeach image quality adjustment parameter is used to vary thecorresponding tone curves of the R, G, and B color components. Aspecific point for application of the correction value is setexperimentally on each tone curve with regard to each image qualityadjustment parameter. The correction value varies the value of the tonecurve at the preset specific point and accordingly changes theinput-output characteristic of the tone curve. Application of correctedtone curves with regard to the respective color components R, G, and Bto the image data GD makes the input-output conversion with regard tothe respective color components R, G, and B of the image data GD andthereby gives the image quality-adjusted image data GD.

On conclusion of the image quality adjustment (step S170), the CPU 200combines the image data GD with the ornamental image data FD accordingto the layout control information LI to generate resulting output imagedata (step S180).

One typical method of combining the image data GD with the ornamentalimage data FD is described. The CPU 200 interprets the script of thelayout control information LI describing the layout locations and thelayout dimensions, determines the locations and the dimensions of therespective image data GD to be laid out on the ornamental image data FDbased on the results of the interpretation, specifies the tone values ofthe ornamental image data FD according to the α channel data, andcombines the image data GD with the ornamental image data FD. The CPU200 resizes (contracts or expands) the dimensions of the respectiveimage data GD according to the layout dimensions of the respectivelayout locations described in the script.

The CPU 200 applies the α channel data and sums up the R, G, and Bvalues of the respective image data to calculate the R, G, and B valuesof resulting output image data. The α channel data is set equal to 0 toprevent interference of the ornamental image data FD with reproductionof the image data GD in the area of an image in a resulting output image(composite image). The α channel data is set equal to 255 to prohibitreproduction of the image data GD in the area of an ornamental image (anornamental area or a frame area) in the resulting output image.

The CPU 200 determines whether any user's change request is entered froman input unit, such as a keyboard or a mouse (step S190). In the case ofno entry of the user's change request (step S190: No), the program goesto step S200.

In the case of entry of any user's change request (step S190: Yes), onthe other hand, the CPU 200 changes the selection of the image data andthe layout locations of the selected image data according to the user'sspecification (step S195) and repeats the processing of steps S170 andS180. The user's demands are accordingly reflected on the selection ofthe image data to be laid out in the ornamental image data and thelayout locations of the image data in the ornamental image data.

The CPU 200 outputs resulting output image data to a printer driver or adisplay driver (step S190) and terminates this processing routine. Theprinter driver executes RGB to CMYK color conversion based on lookuptables, halftoning, and other required series of image processing andeventually sends the output image data with print control commands asraster data to the printer 30.

As described above, the personal computer 20 as the output image datagenerating device of the first embodiment evaluates the image qualitiesof respective image data GD for rating and sequentially allocates theimage data GD having the higher rating to the layout location having thehigher priority. The user is thus required to only specify (select)ornamental image data and multiple image data GD for pasting. Suchsimple specification enables the image data GD of the higher imagequality levels to be readily pasted in the respective layout locationsof the ornamental image data FD.

The image data GD of the higher image quality level is placed in thelayout location of the higher priority, that is, the layout location ofthe greater importance that is closer to the center of the ornamentalimage data FD. This gives a resulting composite image (output image) ofthe objective images with the ornamental image as the high-qualityoutput result.

Arrangement of high-quality (clear) objective images on the main layoutlocations in a ornamental image gives a resulting output image(ornamental image+objective images) of the impressive page layout.

Second Embodiment

An output image data generation process of a second embodiment isdescribed with reference to FIGS. 9 and 10. FIG. 9 shows an example ofratings of image data GD1 to GD5 in the second embodiment. FIG. 10 showsan example of allocation of image data GD to layout locations based onthe priority order defined in the layout control information LI and theratings given by evaluation of the image data GD in the secondembodiment. The output image data generation process of the secondembodiment is similar to the output image data generation process of thefirst embodiment, except that the number of the image data GD is greaterthan the number of layout locations in the ornamental image data FD. Thefollowing description accordingly regards only the difference from theoutput image data generation process of the first embodiment. Thestructure of the personal computer in the second embodiment is identicalwith the structure of the personal computer 20 in the first embodiment.The like elements are thus expressed by the like numerals and are notspecifically described here.

The output image data generation process of the second embodimentmodifies the processing of step S160 in the output image data generationprocess of the first embodiment. The procedure of the second embodimentselects an image folder including five image data GD1 to GD5 andevaluates the image qualities of the respective image data GD1 to GD5.The result of the image quality evaluation is shown in FIG. 9. The firstrating to the fifth rating are given to the image data GD2, GD5, GD3,GD1, and GD4 in this order.

The CPU 200 allocates the respective image data GD to the layoutlocations in the ornamental image data FD according to the ratings andthe determined priority order as shown in FIG. 10. In the secondembodiment, the number of the layout locations in the ornamental imagedata FD is equal to 3, which is less than the number of the image dataGD. The image data GD having the higher ratings (higher total evaluationvalues) are sequentially allocated to the layout locations having thehigher priorities. No layout locations are thus assigned to the imagedata GD1 and GD4 having the fourth rating and the fifth rating. Namelythe image data GD1 and GD4 are not laid out in the ornamental image dataFD nor included in a resulting output image data.

As described above, in addition to the effects of the first embodiment,the output image data generation process of the second embodimentpreferentially includes the image data GD of the higher image quality inthe resulting output image data, when the number of the image data GD isgreater than the number of layout locations included in the ornamentalimage data. This gives a resulting composite image of the high-qualityobjective images with the ornamental image as the output result.

In general, the image data GD of the higher total evaluation value hasthe higher original image quality and the smaller requirement level ofcorrection and accordingly gives a high-quality corrected image. Theimage data GD of the lower total evaluation value, on the contrary, hasthe lower original image quality and the greater requirement level ofcorrection. Correction of such lower-quality image data does notsignificantly improve the image quality of the resulting image. When thenumber of the image data GD is greater than the number of layoutlocations in the ornamental image data, sequential allocation of theimage data GD having the higher ratings to the layout locations gives animpressive, high-quality output image.

Modifications

In the embodiments discussed above, the personal computer 20 is adoptedas the image processing device to execute the series of imageprocessing. The image processing device is, however, not restricted tothe personal computer but may be, for example, a standalone printer or astandalone display device having the image processing functions toexecute the series of image processing. The technique of the inventionis also attained by a printer driver, a video driver, and an imageprocessing application program without the hardware configuration of theimage processing device. The display device includes CRTs, liquidcrystal displays, and projectors that have the image quality adjustmentfunction with regard to image data and are capable of displaying aresulting output image according to the quality-adjusted image data GD.

All or part of the output image data generation process may be executedby the digital still camera 10, in place of the personal computer PC. Inthis case, the output image data generation function discussed in thefirst embodiment or in the second embodiment is added to an image dataprocessing application program, for example, a retouch applicationprogram or a printer driver stored in a ROM of the digital still camera10.

Print data, which include output image data and print control commandsand are generated by the digital still camera 10, are given to theprinter 30 via the cable or via the memory card MC. The printer 30receives the print data and creates a dot pattern on a printing mediumaccording to the received print data to output a printed image. Thedigital still camera 10 may alternatively give output image data to thepersonal computer 20 or the printer 30. The personal computer 20 or theprinter 30 then generates print data including print control commands.

In the above embodiments, the output image data generation process isexecuted by the software or the computer program. The output image datageneration may alternatively be attained by a hardware circuit includinglogic circuits of respective processing steps. This modified structurerelieves the process load of the CPU 200 and ensures the higher-speedoutput image data generation. The hardware circuit of the output imagedata generation is mounted, for example, as a packaged circuit in thedigital still camera 10 and the printer 30 or as an add-on card in thepersonal computer 20.

In the first and the second embodiments discussed above, the locationsof the respective image data GD are determined according to the priorityorder of the layout locations in the ornamental image data and theratings of the respective image data GD. One modified procedure may useonly the ratings of the respective image data GD and allocate therespective image data GD to arbitrary layout locations. This methodplaces at least the image data of the higher image quality levels in thelayout locations of the ornamental image data.

In the embodiments discussed above, the priorities of the respectivelayout locations in the ornamental image data are determined accordingto the priority order specified in the layout control information L1.The priorities may alternatively be determined according to the layoutlocations and the layout dimensions specified in the layout controlinformation LI. For example, the higher priority is given to the layoutlocation that has the larger layout dimensions and is positioned closerto the center of the ornamental image data FD.

The evaluation method of the image data GD described in the firstembodiment is only one example, and any other suitable technique may beapplied to evaluate the image quality of the image data GD.

The output image data generating device, the output image datagenerating method, and the output image data generating program of theinvention are described in detail with reference to some embodiments.These embodiments discussed above are, however, to be considered in allaspects as illustrative and not restrictive. There may be manymodifications, changes, and alterations without departing from the scopeor spirit of the main characteristics of the present invention. Allchanges within the meaning and range of equivalency of the claims areintended to be embraced therein.

The Japanese patent application as the basis of the priority claim ofthe parent application is incorporated in the disclosure hereof byreference:

(1) Japanese Patent Application No. 2003-318056 (filing date: Sep. 10,2003).

1. An output image data generating device that generates output imagedata from multiple objective image data and ornamental image dataaccording to layout control information, wherein the layout controlinformation specifies layout locations and layout dimensions of themultiple objective image data to be laid out on the ornamental imagedata, said output image data generating device comprising: an image dataacquisition module that obtains the multiple objective image data; aornamental image data acquisition module that obtains one or pluralityof the ornamental image data; an image analysis module that analyzeseach of the obtained multiple objective image data; a layout locationassignment module that allocates the multiple objective image data toplural layout locations included in the obtained ornamental image data,based on a result of the analysis; and an output image data generationmodule that generates output image data from the multiple objectiveimage data and the ornamental image data, according to the layoutcontrol information and the allocation of the respective objective imagedata to the plural layout locations.
 2. An output image data generatingdevice in accordance with claim 1, wherein said image analysis modulerates image qualities of the obtained multiple objective image data, andsaid layout location assignment module sequentially allocates themultiple objective image data to the plural layout locations included inthe ornamental image data in a descending order of the ratings.
 3. Anoutput image data generating device in accordance with claim 1, saidoutput image data generating device further comprising: a correctionvalue setting module that analyzes each of the multiple objective imagedata allocated to one of the plural layout locations and sets acorrection value with regard to the objective image data; and an imagequality adjustment module that executes image quality adjustment of eachobjective image data with the setting of the correction value, whereinsaid output image data generation module generates the output image datafrom the multiple objective image data that has gone through the imagequality adjustment.
 4. An output image data generating device inaccordance with claim 3, wherein said correction value setting moduleanalyzes each of the multiple objective image data to obtain acharacteristic value of the objective image data with regard to an imagequality-relating parameter and sets the correction value of theobjective image data, in order to cancel out or at least reduce adifference between the characteristic value and a preset reference valuewith regard to the image quality-relating parameter.
 5. An output imagedata generating device in accordance with claim 1, wherein said layoutlocation assignment module sequentially allocates the multiple objectiveimage data to the plural layout locations in the ornamental image datauntil all the plural layout locations of the ornamental image data areoccupied.
 6. An output image data generating device in accordance withclaim 1, wherein the layout control information additionally specifies apriority order of the plural layout locations, and said layout locationassignment module sequentially allocates objective image data having abetter result of analysis to a layout location having a higher priorityin the ornamental image data.
 7. An output image data generating devicein accordance with claim 6, said output image data generating devicefurther comprising: a priority order setting module that, when saidornamental image data acquisition module obtains the plurality ofornamental image data, refers to the layout control informationregarding the plurality of ornamental image data to set a priority orderof all layout locations included in the plurality of ornamental imagedata, wherein said layout location assignment module sequentiallyallocates the multiple objective image data to the layout locationsincluded in the plurality of ornamental image data in the priorityorder, until all the layout locations included in the plurality ofornamental image data are occupied.
 8. An output image data generatingdevice in accordance with claim 1, wherein said image analysis modulecomputes statistical values of each of the multiple objective image datawith regard to contrast, brightness, color balance, chroma/saturation,and sharpness, evaluates the image quality of the objective image databased on the computed statistical values and preset reference valueswith regard to the contrast, the brightness, the color balance, thechroma/saturation, and the sharpness, and gives a better result ofanalysis to a smaller difference between the statistical value and thepreset reference value.
 9. An output image data generating device inaccordance with claim 6, wherein a higher priority is given to a layoutlocation having greater layout dimensions.
 10. An output image datagenerating device in accordance with claim 6, wherein a higher priorityis given to a layout location that is placed closer to a center of theornamental image data.
 11. An output image data generating device inaccordance with claim 1, said output image data generating devicefurther comprising: a modification module that changes at least eitherselection of the objective image data to be laid out in the layoutlocations in the ornamental image data or the allocation of the multipleobjective image data to the plural layout locations executed by saidlayout location assignment module.
 12. An output image data generatingmethod that generates output image data from multiple objective imagedata and ornamental image data according to layout control information,which specifies layout locations and layout dimensions of the multipleobjective image data to be laid out on the ornamental image data, saidoutput image data generating method comprising the steps of: obtainingthe multiple objective image data; obtaining one or plurality of theornamental image data; analyzing each of the obtained multiple objectiveimage data; allocating the multiple objective image data to plurallayout locations included in the obtained ornamental image data, basedon a result of the analysis; and generating output image data from themultiple objective image data and the ornamental image data, accordingto the layout control information and the allocation of the respectiveobjective image data to the plural layout locations.
 13. An output imagedata generating method in accordance with claim 12, wherein the layoutcontrol information additionally specifies a priority order of theplural layout locations, and said layout location allocating stepsequentially allocates objective image data having a better result ofanalysis to a layout location having a higher priority in the ornamentalimage data.
 14. An output image data generating method in accordancewith claim 12, said output image data generating method furthercomprising the step of rating image qualities of the analyzed multipleobjective image data, and wherein said layout location allocating stepsequentially allocates the multiple objective image data to the plurallayout locations included in the ornamental image data in a descendingorder of the ratings.